package com.ynet.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


public class PropertiesUtils {

	public String getPropertiesValue(String key){
		
		InputStream inputStream = getClass().getClassLoader().getResourceAsStream("config.properties");

		Properties prop = new Properties();
		try {
			prop.load(inputStream);
		} catch (IOException e) {
			e.printStackTrace();
		}
		String value = (String) prop.get(key);
		return value;
	}
	
	public static void main(String[] args){
		new PropertiesUtils().getPropertiesValue("userName");
	}
	
}
